﻿using System.Web.Routing;
using Home.Site.Controllers;
using Home.Site.Controllers.Photo;
using Home.Site.Controllers.Review;
using Home.Site.Models.DataLayer;
using Home.Site.NavigationRoutes;

namespace Home.Site.App_Start
{
    public class LayoutsRouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.MapNavigationRoute<HomeController>("Главная", c => c.Index(null));
            routes.MapNavigationRoute<AlbumController>("Фотоальбомы", a => a.All());
            routes.MapNavigationRoute<ReviewController>("Обзоры",c=>c.Index(null,CategoryTypes.Music,null))
                .AddChildRoute<ReviewController>("Игры",r=>r.Games())
                .AddChildRoute<ReviewController>("Музыка", r => r.Music())
                .AddChildRoute<ReviewController>("Интересности", r => r.Interest());
            routes.MapNavigationRoute<HomeController>("Об авторе", c => c.Contact());
        }
    }
}
